﻿using Loki.IoC;
using Loki.IoC.Registration;

namespace Luna.Model.CRM
{
    public class ServiceInstaller : LokiContextInstaller
    {
        public override void Install(IObjectContext context)
        {
            context.Register(Element.Entity<IContact, Contact>());
            context.Register(Element.Entity<IAccount, Account>());
            context.Register(Element.Entity<IEditableCategory, EditableCategory>());

            context.Register(Element.Service<ICRMService, LunaCRMService>());
        }

        private static ServiceInstaller crm = new ServiceInstaller();

        public static ServiceInstaller CRM
        {
            get
            {
                return crm;
            }
        }
    }
}